<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

// ------------------------------------------------------------------------

/**
 * Moraes Ribas Util Helpers
 *
 * Várias funções úteis para o projeto
 *
 * @package		CodeIgniter
 * @subpackage	Helpers
 * @category	Helpers
 * @author		Ramon Moraes
 */

// --------------------------------------------------------------------

function debug($data, $exit=false){
	echo '<pre>';
	print_r($data);
	echo '</pre>';
	if($exit){
		exit;
	}
}

function cortaTexto($string, $numCaracteres){
	
	$string = strip_tags($string);
	if(strlen($string) > $numCaracteres)
		return substr($string, 0, $numCaracteres-3) . '...';
	return $string;
}

/* End of file util_helper.php */
/* Location: ./application/helpers/util_helper.php */